import request from '@/utils/request'

// 查询购物车列表
export function listCart(query) {
  return request({
    url: '/cart/cart/list',
    method: 'get',
    params: query
  })
}

// 查询购物车详细
export function getCart(cartId) {
  return request({
    url: '/cart/cart/' + cartId,
    method: 'get'
  })
}


// 删除购物车
export function delCart(cartId) {
  return request({
    url: '/cart/cart/' + cartId,
    method: 'delete'
  })
}

// 发送下单请求
export function placeOrder(cartIds) {
  return request({
    url: '/cart/cart/order',
    method: 'post',
    data: cartIds
  })
}
